package com.example.springcmw.rabbitmq.controller;

import com.example.springcmw.rabbitmq.publisher.PublishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * <p>Copyriht: Copyright (c) 2012</p>
 * <p>Company: AVICIT Co., Ltd</p>
 * @Author DIGITAL-HUPENG
 * @Date 2021/10/26 10:57
 * @Version 1.0
 **/
@RestController
@RequestMapping("/cmw/rabbitmq")
public class Controller {

    @Autowired
    private PublishService publishService;

    @RequestMapping("/sendMsg")
    public String sendMsg(@RequestParam String msg) throws Exception {
        return publishService.sendMsg(msg);
    }

}
